const express = require('express');
const wearService = require('../services/wearImgService');

var router = express.Router();

// 只限前10个商品展示
router.get('/detail', async function (req, res) {
    // console.log(req.query)        //{ type: 'kid' }
    if (!req) {
        res.send({
            success: false,
            msg: 'ajax data is error!'
        })
    } else {
        var data = await wearService.findNumImg(req.query.type);
        res.send(data);
    }
})


exports.router = router;